package com.heima.util;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * @author 21236
 */
public class LocalDateUtil {

    /**
     * 添加了一行注释
     * @param date
     * @return
     */
    public static LocalDate parse(String date) {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        String[] split = date.split(" ");
        return LocalDate.parse(split[0], formatter);
    }
}
